<template>
  <!-- 治安看板 -->
  <div class="wh100">
    <safetySingle v-if="isOneProject"></safetySingle>
    <safetyMore v-else></safetyMore>
  </div>
</template>
<script>
import msgUtil from '@/utils/msgUtil'
import safetyMore from './safety-more.vue'
import safetySingle from './safety-single.vue'
import store from '@/store'
export default {
  name: 'safety',
  components: {
    safetyMore,
    safetySingle
  },
  computed: {
    projectId() {
      return this.$store.state.settings.changeHeaderProject
    }
  },
  watch: {
    projectId: {
      immediate: true,
      handler: function(val) {
        if (val) {
          this.isOneProject = true
        } else {
          this.isOneProject = false
        }
        console.log("isOneProject=", this.isOneProject)
      }
    }
  },
  data() {
    return {
      isOneProject: true
    }
  },
  created() { },
  mounted() { },
  methods: {},
}
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/homepage.scss";
</style>
